<?php
require dirname(__FILE__) . '/../auto_load.php';
class ProductModelTest extends PHPUnit_Framework_TestCase
{
    private $m;
    
    public function setUp()
    {
        $category_name = 'graphics_card';
        $written_language_tag = 'zh-cmn-Hans-CN';
        $this->m = new ProductModel($category_name,$written_language_tag);
    }
    
    public function testGetProductAttributeValueWlp()
    {
        $result = $this->m->getProductAttributeValueWlp();
        var_dump($result);
    }
    
    public function testGetProductsId()
    {
        $where = array(
            'gpu' => '1'
        );
        $limit_start = 0;
        $limit_size = 12;
        $result = $this->m->getProductsId($where,$limit_start,$limit_size);
        var_dump($result);
    }
    
    public function testGetProductsDetail()
    {
        $products_id = array(
            '1',
            '3',
        );
        $result = $this->m->getProductsDetail($products_id);
        var_dump($result);
    }
    
    public function testGetProductsFileUri()
    {
        $products_id = array(
            '1',
            '3',
        );
        $result = $this->m->getProductsFileUri($products_id,'preview_img');
        var_dump($result);
    }
}
?>
}
?>
